Members
Overall Objectives
Research Program
Application Domains
New Software and Platforms
New Results
Partnerships and Cooperations
Dissemination
Bibliography
XML PDF e-pub
PDF e-Pub


Section: New Results

Free Theorems for Curry

Participant : Lutz Straßburger.

Free theorems [79] are a means of type-based reasoning and are being successfully applied for typed functional programming languages like Haskell, e.g., for program transformation and generally establishing semantic properties [53] , [78] . As a simple example, for every polymorphic function f::[α][α] from lists to lists, arbitrary types τ1 and τ2, and a function g::τ1τ2, we have f(𝗆𝖺𝗉g)=(𝗆𝖺𝗉g)f, for the standard function 𝗆𝖺𝗉::(αβ)[α][β] which takes a function and a list and applies that function to every entry of the list. It would be of interest to also have such free theorems available for typed functional-logic languages like Curry.

Previous work [48] has investigated free theorems for such a language, Curry  [60] , phenomenologically and provides intuition for premises of free theorems as well as counterexamples. Proof of the positive claims has been elusive so far, mainly because Curry's type system fails to reflect the key feature: nondeterminism. This avoidance is convenient for programmers, as they do not have to distinguish between deterministic and nondeterministic values. However, it is a hindrance to formal reasoning: the conditions identified in  [48] include a notion of determinism, and hence it is a serious weakness of the type system not to capture this.

In a joint work with colleagues at the University of Bonn, published in [25] , we have developed an intermediate language, called SaLT, that allowed us to prove a Parametricity Theorem which could be used to derive free theorems for Curry.

This work is the result of the PHC Procope collaboration with the University of Bonn (duration 2012-2013).